package com.foreknow.tijian.controller;

import com.foreknow.tijian.po.Users;
import com.foreknow.tijian.service.UsersService;
import com.foreknow.tijian.service.Impl.UsersServiceImpl;

import javax.servlet.http.HttpServletRequest;

/**
 * 根据手机号码和密码进行登录验证
 * http://localhost:8080/tijian/UsersController/getUsersByUserIdByPass?userId=12345671111&password=123
 */
public class UsersController {
    public Object getUsersByUserIdByPass(HttpServletRequest request) {
        UsersService usersService = new UsersServiceImpl();
        Users users = new Users();
        String userId = request.getParameter("userId");
        String password = request.getParameter("password");
        Users user = usersService.getUsersByUserIdByPass(userId, password);
        return user;
    }

}
